<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/html/axios.min.js"></script>
    <script src="/html/util.js"></script>
    <script>
        function $(elementId){
            return document.getElementById(elementId);
        }
        function land(){
            axios.get("/user/login",{
                params:{
                    acc:$("name").value,
                    pwd:$("pwd").value
                }
            }).then(e => {
                if(e.data == "ok"){
                    location.href ="index.html"
                }
                else{
                    $("landSpan").innerHTML = "登陆失败";
                }
            });
        }

        function zc(){
        location.href ="zc.html"

        }


    </script>
</head>
<body>
<span style="color: red" id="landSpan"></span>
用户名：<input type="text" id="name"><br>
密码：<input type="password" id="pwd"><br>
<input type="button" value="提交" onclick="land()">
<input type="button" value="注册" onclick="zc()">

</body>
</html>